const { env } = require("./env");
const UPLOAD_PATH =
  env === "dev"
    ? "C://Users//leo.li//AppData//Local//Packages//CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc//LocalState//rootfs//home//leo//upload//admin-upload-ebook"
    : "服务器上的product目录";
const UPLOAD_URL =
  env === "dev"
    ? "http://apitest.leoit.top:8089/admin-upload-ebook"
    : "http://www.leoit.top/admin-upload-ebook";

module.exports = {
  CODE_ERROR: -1,
  CODE_SUCCESS: 0,
  CODE_TOKEN_EXPIRED: -2, // 认证失败
  debug: false, // 是否调试状态
  PWD_SALT: "admin_imooc_node",
  PRIVATE_KEY: "QFoYMXhZpqDguCCNPtdH", //私钥
  JWT_EXPIRED: 60 * 60, // 单位 秒
  UPLOAD_PATH, // 文件上传后的根目录
  UPLOAD_URL, // 文件下载路径
  // MIME_TYPE_EPUB: "application/epub+zip",
  MIME_TYPE_EPUB: "application/epub",
};
